package com.chance.cc.crawler.prod.command.trigger.domain.vm.autohome;

import com.chance.cc.crawler.core.CrawlerJob;
import com.chance.cc.crawler.core.downloader.HttpPage;
import com.chance.cc.crawler.meta.core.bean.CrawlerMetaConstant;
import com.chance.cc.crawler.prod.command.job.domain.vm.autohome.geely.AutoHomeForumGeelyReleaseCrawlerSchedulerJob;
import com.chance.cc.crawler.prod.command.job.domain.vm.autohome.geely.AutoHomeForumGeelyTraceCrawlerSchedulerJob;
import com.chance.cc.crawler.prod.command.job.domain.vm.autohome.realtime.*;
import com.chance.cc.crawler.prod.command.job.domain.vm.autohome.trace.*;
import com.chance.cc.crawler.prod.command.trigger.CommonCrawlerSchedulerTrigger;

/**
 * @author lt
 * @version 1.0
 * @date 2020-12-09 16:15:28
 * @email okprog@sina.com
 */
public class AutoHomeCommonCrawlerScheduleTrigger extends CommonCrawlerSchedulerTrigger {


    public static void main(String[] args) {
//        publishAutoHomeArticleCrawlerScheduleTriggerInfo();

//        publishAutoHomeArticleTraceCrawlerScheduleTriggerInfo();

//        publishAutoHomeVideoCrawlerScheduleTriggerInfo();

//        publishAutoHomeVideoTraceCrawlerScheduleTriggerInfo();

       // publishAutoHomeForumReplyCrawlerScheduleTriggerInfo();

//        publishAutoHomeForumReleaseTraceCrawlerScheduleTriggerInfo();

//        publishAutoHomeForumReleaseCrawlerScheduleTriggerInfo();

//        publishAutoHomePraiseCrawlerScheduleTriggerInfo();

//        publishAutoHomePraiseTraceCrawlerScheduleTriggerInfo();
//
//        publishAutoHomeCheArticleCrawlerScheduleTriggerInfo();
//
//        publishAutoHomeCheArticleTraceCrawlerScheduleTriggerInfo();
//
//        publishAutoHomeCheVideoCrawlerScheduleTriggerInfo();
//
//        publishAutoHomeCheVideoTraceCrawlerScheduleTriggerInfo();

        //吉利项目
        publishAutoHomeForumGeelyRealtimeCrawlerScheduleTriggerInfo();
 //       publishAutoHomeForumGeelyTraceCrawlerScheduleTriggerInfo();
    }

    /**
     * 发布汽车之家新闻trigger info

     */
    public static void publishAutoHomeArticleCrawlerScheduleTriggerInfo(){
        CrawlerJob crawlerJob = AutoHomeWebArticleCrawlerScheduleJob.autoHomeScheduler();

        metaServiceCommand_17.addOrUpdateScheduleCrawlerTrigger(
                crawlerJob.generateCrawlerKey(),
                crawlerJob.generateCrawlerTriggerKey(),
                AutoHomeWebArticleCrawlerScheduleJob.domain,
                CrawlerMetaConstant.ScheduleJobTrigger_Cron,
                "0 0 8/1 * * ?",
                "汽车之家新闻实时采集任务执行，每小时执行一次"
        );
    }


    /**
     * 发布汽车之家新闻回溯trigger info
     */
    public static void publishAutoHomeArticleTraceCrawlerScheduleTriggerInfo(){
        CrawlerJob crawlerJob = AutoHomeWebArticleTraceCrawlerScheduleJob.autoHomeScheduler();
        HttpPage httpPage = metaServiceCommand_17.addOrUpdateScheduleCrawlerTrigger(
                crawlerJob.generateCrawlerKey(),
                crawlerJob.generateCrawlerTriggerKey(),
                AutoHomeWebArticleTraceCrawlerScheduleJob.domain,
                CrawlerMetaConstant.ScheduleJobTrigger_Cron,
                "0 0 1 * * ?",
                "汽车之家新闻回溯三天采集任务执行，每天执行一次"
        );

    }



    /**
     * 发布汽车之家视频trigger info
     */
    public static void publishAutoHomeVideoCrawlerScheduleTriggerInfo(){
        CrawlerJob crawlerJob = AutoHomeWebVideoCrawlerScheduleJob.autoHomeScheduler();
        metaServiceCommand_17.addOrUpdateScheduleCrawlerTrigger(
                crawlerJob.generateCrawlerKey(),
                crawlerJob.generateCrawlerTriggerKey(),
                AutoHomeWebVideoCrawlerScheduleJob.domain,
                CrawlerMetaConstant.ScheduleJobTrigger_Cron,
                "0 0 8/1 * * ?",
                "汽车之家视频实时采集任务执行，每小时执行一次"
        );

    }

    /**
     * 发布汽车之家视频回溯trigger info
     */
    public static void publishAutoHomeVideoTraceCrawlerScheduleTriggerInfo(){
        CrawlerJob crawlerJob = AutoHomeWebVideoTraceCrawlerScheduleJob.autoHomeScheduler();
        metaServiceCommand_17.addOrUpdateScheduleCrawlerTrigger(
                crawlerJob.generateCrawlerKey(),
                crawlerJob.generateCrawlerTriggerKey(),
                AutoHomeWebVideoTraceCrawlerScheduleJob.domain,
                CrawlerMetaConstant.ScheduleJobTrigger_Cron,
                "0 0 1 * * ?",
                "汽车之家视频回溯三天回复采集任务执行，每天执行一次"
        );
    }




    /**
     * 发布汽车之家论坛最新回复追溯trigger info
     */
    public static void publishAutoHomeForumReplyCrawlerScheduleTriggerInfo(){
        CrawlerJob crawlerJob = AutoHomeWebForumReplyTraceCrawlerScheduleJob.autoHomeScheduler();
        metaServiceCommand_17.addOrUpdateScheduleCrawlerTrigger(
                crawlerJob.generateCrawlerKey(),
                crawlerJob.generateCrawlerTriggerKey(),
                AutoHomeWebForumReplyTraceCrawlerScheduleJob.domain,
//                CrawlerMetaConstant.ScheduleJobTrigger_Simple,
                CrawlerMetaConstant.ScheduleJobTrigger_Cron,
                "0 0 0/6 * * ?",
//                "",
                "汽车之家论坛最新回复实时采集任务执行，每天0点执行一次"
        );
    }


    /**
     * 发布汽车之家论坛追溯三天互动trigger info
     */
    public static void publishAutoHomeForumReleaseTraceCrawlerScheduleTriggerInfo(){
        CrawlerJob crawlerJob = AutoHomeWebForumReleaseTraceCrawlerSchedulerJob.autoHomeScheduler();
        HttpPage httpPage = metaServiceCommand_17.addOrUpdateScheduleCrawlerTrigger(
                crawlerJob.generateCrawlerKey(),
                crawlerJob.generateCrawlerTriggerKey(),
                AutoHomeWebForumReleaseTraceCrawlerSchedulerJob.domain,
                CrawlerMetaConstant.ScheduleJobTrigger_Cron,
                "0 0 1 * * ?",
                "汽车之家论坛追溯三天互动采集任务执行，每天1点执行一次"
        );
    }

    /**
     * 发布汽车之家论坛最新发布trigger info
     */
    public static void publishAutoHomeForumReleaseCrawlerScheduleTriggerInfo(){
        CrawlerJob crawlerJob = AutoHomeWebForumReleaseCrawlerScheduleJob.autoHomeScheduler();
        metaServiceCommand_17.addOrUpdateScheduleCrawlerTrigger(
                crawlerJob.generateCrawlerKey(),
                crawlerJob.generateCrawlerTriggerKey(),
                AutoHomeWebForumReleaseCrawlerScheduleJob.domain,
                CrawlerMetaConstant.ScheduleJobTrigger_Cron,
                "0 0 8/1 * * ?",
                "汽车之家论坛最新发布实时采集任务执行，每1小时执行一次"
        );
    }

    /**
     * 发布汽车之家口碑实时trigger info
     */
    public static void publishAutoHomePraiseCrawlerScheduleTriggerInfo(){
        CrawlerJob crawlerJob = AutoHomeWebPraiseCrawlerScheduleJob.autoHomeScheduler();
        HttpPage httpPage = metaServiceCommand_17.addOrUpdateScheduleCrawlerTrigger(
                crawlerJob.generateCrawlerKey(),
                crawlerJob.generateCrawlerTriggerKey(),
                AutoHomeWebPraiseCrawlerScheduleJob.domain,
                CrawlerMetaConstant.ScheduleJobTrigger_Cron,
                "0 0 8/1 * * ?",
                "汽车之家口碑实时采集任务执行，每1小时执行一次"
        );
    }

    /**
     * 发布汽车之家口碑回溯trigger info
     */
    public static void publishAutoHomePraiseTraceCrawlerScheduleTriggerInfo(){
        CrawlerJob crawlerJob = AutoHomeWebPraiseTraceCrawlerScheduleJob.autoHomeScheduler();
        HttpPage httpPage = metaServiceCommand_17.addOrUpdateScheduleCrawlerTrigger(
                crawlerJob.generateCrawlerKey(),
                crawlerJob.generateCrawlerTriggerKey(),
                AutoHomeWebPraiseTraceCrawlerScheduleJob.domain,
                CrawlerMetaConstant.ScheduleJobTrigger_Cron,
                "0 0 1 * * ?",
                "汽车之家口碑回溯三天回复采集任务执行，每天执行一次"
        );
    }


    /**
     * 发布汽车之家车家号文章实时trigger info
     */
    public static void publishAutoHomeCheArticleCrawlerScheduleTriggerInfo(){
        CrawlerJob crawlerJob = AutoHomeWebCheArticleCrawlerScheduleJob.autoHomeScheduler();
        metaServiceCommand_17.addOrUpdateScheduleCrawlerTrigger(
                crawlerJob.generateCrawlerKey(),
                crawlerJob.generateCrawlerTriggerKey(),
                AutoHomeWebCheArticleCrawlerScheduleJob.domain,
                CrawlerMetaConstant.ScheduleJobTrigger_Cron,
                "0 0 * * * ? ",
                "汽车之家车家号文章实时采集任务执行，每小时执行一次"
        );
    }

    /**
     * 发布汽车之家车架号文章回溯三天回复trigger info
     */
    public static void publishAutoHomeCheArticleTraceCrawlerScheduleTriggerInfo(){
        CrawlerJob crawlerJob = AutoHomeWebCheArticleTraceCrawlerScheduleJob.autoHomeScheduler();
        metaServiceCommand_17.addOrUpdateScheduleCrawlerTrigger(
                crawlerJob.generateCrawlerKey(),
                crawlerJob.generateCrawlerTriggerKey(),
                AutoHomeWebCheArticleTraceCrawlerScheduleJob.domain,
                CrawlerMetaConstant.ScheduleJobTrigger_Cron,
                "0 0 3 * * ?",
                "汽车之家车家号文章回溯七天回复采集任务执行，每天执行一次"
        );
    }

    /**
     * 发布汽车之家车家号视频实时trigger info
     */
    public static void publishAutoHomeCheVideoCrawlerScheduleTriggerInfo(){
        CrawlerJob crawlerJob = AutoHomeWebCheVideoCrawlerScheduleJob.autoHomeScheduler();
        HttpPage httpPage = metaServiceCommand_17.addOrUpdateScheduleCrawlerTrigger(
                crawlerJob.generateCrawlerKey(),
                crawlerJob.generateCrawlerTriggerKey(),
                AutoHomeWebCheVideoCrawlerScheduleJob.domain,
                CrawlerMetaConstant.ScheduleJobTrigger_Cron,
                "0 0 * * * ? ",
                "汽车之家车家号视频实时采集任务执行，每小时执行一次"
        );
    }

    /**
     * 发布汽车之家车架号视频回溯三天回复trigger info
     */
    public static void publishAutoHomeCheVideoTraceCrawlerScheduleTriggerInfo(){
        CrawlerJob crawlerJob = AutoHomeWebCheVideoTraceCrawlerScheduleJob.autoHomeScheduler();
        metaServiceCommand_17.addOrUpdateScheduleCrawlerTrigger(
                crawlerJob.generateCrawlerKey(),
                crawlerJob.generateCrawlerTriggerKey(),
                AutoHomeWebCheVideoTraceCrawlerScheduleJob.domain,
                CrawlerMetaConstant.ScheduleJobTrigger_Cron,
                "0 0 2 * * ?",
                "汽车之家车家号视频回溯七天回复采集任务执行，每天执行一次"
        );
    }


    /**
     * 吉利项目汽车之家论坛发布时间排序
     */
    public static void publishAutoHomeForumGeelyRealtimeCrawlerScheduleTriggerInfo(){
        CrawlerJob crawlerJob = AutoHomeForumGeelyReleaseCrawlerSchedulerJob.autoHomeScheduler();
        metaServiceCommand_17.addOrUpdateScheduleCrawlerTrigger(
                crawlerJob.generateCrawlerKey(),
                crawlerJob.generateCrawlerTriggerKey(),
                AutoHomeForumGeelyReleaseCrawlerSchedulerJob.domain,
//                CrawlerMetaConstant.ScheduleJobTrigger_Simple,
                CrawlerMetaConstant.ScheduleJobTrigger_Cron,
                "0 0 17 * * ?",
//                "",
                "汽车之家吉利项目论坛发布时间排序每日17采集一次"
        );
    }

    /**
     * 吉利项目汽车之家论坛回复时间排序
     */
    public static void publishAutoHomeForumGeelyTraceCrawlerScheduleTriggerInfo(){
        CrawlerJob crawlerJob = AutoHomeForumGeelyTraceCrawlerSchedulerJob.autoHomeScheduler();
        metaServiceCommand_17.addOrUpdateScheduleCrawlerTrigger(
                crawlerJob.generateCrawlerKey(),
                crawlerJob.generateCrawlerTriggerKey(),
                AutoHomeForumGeelyTraceCrawlerSchedulerJob.domain,
//                CrawlerMetaConstant.ScheduleJobTrigger_Simple,
                CrawlerMetaConstant.ScheduleJobTrigger_Cron,
                "0 20 2 * * ?",
//                "",
                "汽车之家吉利项目论坛回复时间排序每日2:20分采集一次"
        );
    }
}
